<?php defined('IN_YuLin') || exit('NO PERMIT!'); ?>
{template index/header}
	<div class="container containerUser fix pt15">
		{template member/slide}
		<div class="userRight" id="id_right_body">
            <div class="userTitle mgb10">我要提现</div>
            <div class="userMain mgb10">
                <ul class="submitContent mg30" id="id_tx_request">
                    <li>
                        <span >账户余额：</span>
                        <ins ><div class="money" id="id_account_money">{$user['money']}</div>&nbsp;&nbsp;</ins>
            			元
                    </li>
                    <li>
                        <span >可提现金额：</span>
                        <ins ><div class="money" id="id_can_postal">{$user['money'] - $usedmoney}</div>&nbsp;&nbsp;</ins>
                		元
                    </li>
                    <li>
                        <span >今天剩余提现次数：</span>
                        <ins ><div class="money" id="id_surplus_times">{$count}</div>&nbsp;&nbsp;</ins>
                    	次
                    </li>
                    <li class="tag_postal_dm">
                        <span >选择银行：</span>
                        <div class="selectBankCon">
                            <div class="selectBank banked bankABC" id="id_selectBank">
                            	<input type="hidden" value=""/>
                                <span >请选择银行</span>
                                <i></i>
                                <ins> 尾号：0215</ins>
                            </div>
                            <ul class="bankList fix" style="display: none;" id="id_user_bankList">
                                {loop $banklist as $row}
                                <li>
                                    <input type="radio" id="{$row['id']}">
                                    <em class="iconBank bankABC"></em>
                                    <ins >
                            			开户人姓名：{$row['truename']}
                                        <br >
                                    	银行卡号：{$row['bankcard']}
                                    </ins>
                                </li>
                                {/loop}
                            </ul>
                        </div>
                    </li>
                    <li class="tag_postal_dm">
                        <span > 提现金额：</span>
                        <input id="id_postal_money" tag="提现金额" placeholder="请输入您要提现的金额" type="text" value="" class="userInput" />
                    </li>
                    <li class="tag_postal_dm">
                        <span>安全密码：</span>
                        <input id="id_bank_security_pass" type="password" autocomplete="off" tag="安全密码" value="" placeholder="请输入您的安全密码" class="userInput" />
                    </li>
                    <li class="tag_postal_dm">
                        <span></span>
                        <a class="submitBtn" id="id_submit_postal">确定</a>
                    </li>
                </ul>
                <div id="id_no_bindCard" style=" height: 300px; display: none;">
                	<div style=" text-align: center; line-height: 32px; font-size: 16px; margin-top: 100px; width: 100%; height: 100%;">请先绑定银行卡</div>
                </div>
                <div class="userTip mg30">
                    <p>
                    	※ 温馨提示：
                    	<br >
                    	可提现金额=投注金额+中奖金额+代理返点
                    	<br >
                    	单笔提现：最低
                    	<ins >1</ins>
                   		 元，最高
                    	<ins >500000</ins>
                   		 元
                    	<br >
                    	大众云保障玩家资金绝对安全，监管举报：dazhongtousu@gmail.com
                    </p>
                </div>
            </div>
        </div>
	</div>
    
    
	<script type="text/javascript">
        var getDataUrl  = "{U('json/func_member')}";
        $(function () {
            $('#id_submit_postal').click(function(){
                var usermoney = "{$user['money']}";
                var dwmoney = $('#id_postal_money').val();
                var pd = $('#id_bank_security_pass').val();
                
                if(dwmoney == '')
                {
                    layer.alert('请输入提现金额', {
                        title: '温馨提示'
                    })
                    return;
                }
                if(isNaN(dwmoney) || parseFloat(dwmoney) < 0){
                    layer.alert('请输入正确的提现金额', {
                        title: '温馨提示'
                    })
                    return;
                }
                if(parseFloat(usermoney) < parseFloat(dwmoney)){
                    layer.alert('提现金额不能大于余额', {
                        title: '温馨提示'
                    })
                    return;
                }
                if(pd == '')
                {
                    layer.alert('请输入安全密码', {
                        title: '温馨提示'
                    })
                    return;
                }
                var url = "{U('member/moneytx/check')}";
                $.post(url,{pd:pd},function(data){
                    
                });

                layer.alert('提交成功,请等待审核', {
                    title: '温馨提示'
                })
                return;
            });
        });
	</script>
	<script src="static/js/member/member_common_func.js"></script>
	<script src="static/js/member/member_postal_init.js"></script>
	
{template index/footer}